import request from '@/utils/request'

// 企业查询部门列表
export const getDepartments = data => {
  return request({
    url: '/company/department'
  })
}
// 根据id删除部门
export const delDepartments = id => {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
// 新增部门
export const addDepartments = data => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据ID查询部门详情
export const DepartmentDetails = id => {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 根据ID修改部门详情
export const editDepartments = data => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
